package com.sdx.console.banner.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import org.apache.commons.lang3.StringUtils;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.sdx.service.ConfigService;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/* 
* 
* gen by Spring Boot2 Admin 2019-04-15
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class BaseBanner extends BaseEntity{

    //唯一主键
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID	
    private Long bannerId ;
	private Integer tenantId;
    //轮播图片
    private String bannerPath ;
	
    //标题
    private String title ;
	
    //跳转地址
    private String href ;
	
    //Banner归属 [1-全部，2-首页，3-问答]
    private String come ;
	
    //排序
    private Integer sort ;
	
    //轮播状态[0-新建 1-已上线 2-已下线]
    private String status ;

    //跳转类型
    private String type ;
	
    //目标平台[来源模块 14、公开课，15、圣达信教育，16、志愿填报，17、自主招生，18、艺考生]
    private String module ;
	
    //组织ID
    private Integer provId ;
	
    //创建时间
    private Date createdTime ;
	
	public String getBannerPathView(){
		return Utils.imageUrl(bannerPath);
	}

	@ColumnIgnore
	private String displyName;

	private String  shareImg;

    public String getShareImgView(){
        return Utils.imageUrl(shareImg);
    }
}
